from selenium import webdriver
import time
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains

# 打开Edge浏览器
driver = webdriver.Edge()
# 进入酒仙网
driver.get('http://10.59.9.12:7001/')
# 窗口最大化
driver.maximize_window()
login = driver.find_element(By.XPATH, '/html/body/div[1]/div/div[2]/ul/li[1]/a')
# # 鼠标左键点击
# ActionChains(driver).click(login).perform()
# time.sleep(3)
# 鼠标右击
# ActionChains(driver).context_click(login).perform()
# time.sleep(3)
# # 鼠标双击
# ActionChains(driver).double_click(login).perform()
# time.sleep(3)
# # 鼠标三击
# ActionChains(driver).double_click(login).click(login).perform()
# time.sleep(3)
# # 鼠标悬停
# ActionChains(driver).move_to_element(login).perform()
# time.sleep(3)
# # 鼠标拖拽x,y
# ActionChains(driver).drag_and_drop_by_offset(login,400,400).perform()
# time.sleep(3)
# # 鼠标按住不放
# ActionChains(driver).click_and_hold(login).perform()
# time.sleep(3)
# # 鼠标释放
# ActionChains(driver).release()
# time.sleep(3)